<?php
/**
 * Created by PhpStorm.
 * User: xpz
 * Date: 2021/5/10
 * Time: 9:13
 */

namespace app\common\model;
use think\Model;


class Company extends Model
{
    protected $name = 'company';

    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'add_time';

    protected function setStartTimeAttr($value)
    {
        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
    }
    protected function setEndTimeAttr($value)
    {
        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
    }

}